package com.dandan.mobilelover.service.impl;


import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dandan.mobilelover.component.Pagination;
import com.dandan.mobilelover.dao.BookRepository;
import com.dandan.mobilelover.entity.Book;
import com.dandan.mobilelover.service.BookService;


@Service
@Transactional
public class BookServiceImpl implements BookService {

	@Inject
	private BookRepository bookRepository;

	@Override
	public void saveBook(Book book) {
		bookRepository.save(book);
	}

	@Override
	public List<Book> searchList(Pagination p) {
		return bookRepository.findAll();
	}
	
	 

}
